package com.example.demo.controller;

import com.example.demo.domain.Student;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Controller
public class StudentController {
    @GetMapping("/student")
    public String getStudent(@RequestBody Student student, Model model){
     student.setName("修改后姓名");
     model.addAttribute("student",student);
     return "hello";
    }
}
